﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CSharpDay02
{
    public class Program
    {
        public static void Main(string[] args)
        {
            Animal animalObject = new Animal(4, 15, "Fido");
            Animal emptyAnimal = new Animal();

            Dog dogObject = new Dog("Lucky", 7, "Black Lab", "Black");
            Dog emptyDog = new Dog();
            double num = .876;
            string display = num.ToString("#,##0.0000");
            Console.WriteLine(display);
            Console.ReadLine();
        }
    }

    /// <summary>
    /// This is an animal class.
    /// </summary>
    public class Animal
    {
        /// <summary>
        /// The property holding the number of legs the animal has.
        /// </summary>
        public int NumLegs { get; set; }
        public int Age { get; set; }
        public string Name { get; set; }

        public Animal()
        {
        }

        /// <summary>
        /// Creates a new animal object for us
        /// </summary>
        /// <param name="legs">Number of legs this animal has</param>
        /// <param name="age">The age of the animal</param>
        /// <param name="name">Name of the animal</param>
        public Animal(int legs, int age, string name)
        {
            this.NumLegs = legs;
            this.Age = age;
            this.Name = name;
        }
    }

    public class Dog : Animal
    {
        public string Breed { get; set; }
        public string HairColor { get; set; }

        public Dog()
        {
        }

        public Dog(string name, int age, string breed, string hair)
        {
            this.Name = name;
            this.Age = age;
            this.Breed = breed;
            this.HairColor = hair;
            this.NumLegs = 4;
        }

        public Dog(string name, int age, string breed, string hair, int numLegs)
        {
            this.Name = name;
            this.Age = age;
            this.Breed = breed;
            this.HairColor = hair;
            this.NumLegs = numLegs;
        }
    }
}

/* Access Modifiers
 * Public - global access
 * Private - limited to only the class itself
 * Protected - Only the class itself, and any class that directly inherits from it
 * Internal - limited to the assembly
 * Internal Protected - limited to the assembly, or any class that directly inherits that class
 */